package com.tanglongan.concurrent._basic;

public class Demo23 {

    public static void main(String[] args) {
        System.out.println("主线程的运行优先级是：" + Thread.currentThread().getPriority());
        Thread.currentThread().setPriority(1);
        System.out.println("主线程的运行优先级是：" + Thread.currentThread().getPriority());

        Thread t = new Demo23Thread();
        t.start();
    }
}

class Demo23Thread extends Thread {
    @Override
    public void run() {
        System.out.println("子线程的运行优先级是：" + Thread.currentThread().getPriority());
    }
}